package main

import (
	"gitee.com/luo_jun99/go_learning/webServer"

	"log"
	"net/http"
)

func main() {

	http.HandleFunc("/", webServer.GreetingsHandler)

	http.HandleFunc("/view/", webServer.ViewHandler)

	http.HandleFunc("/edit/", webServer.EditHtmlPage)

	http.HandleFunc("/save/", webServer.SavePage)

	// http.ListenAndServe() 方法只有当有错误发生时，才会返回一个错误
	log.Fatal(http.ListenAndServe("0.0.0.0:80", nil))
}
